<template>
<view class="container padding detail-white">
	<view class="task-item border">
		<view class="task-item-content">
			<text>修改头像</text>
		</view>
		<view class="task-item-action">
			<image class="subject-avatar"
				src="/static/v2_qb8b4c.png"
				mode="aspectFill"></image>
		</view>
	</view>
	<view class="task-item border">
		<view class="task-item-content">
			<text>姓名</text>
		</view>
		<view class="task-item-time">
			吴彦祖
		</view>
	</view>
	<view class="task-item border">
		<view class="task-item-content">
			<text>性别</text>
		</view>
		<view class="task-item-time">
			男生
		</view>
	</view>
	<view class="task-item border">
		<view class="task-item-content">
			<text>所在地区</text>
		</view>
		<view class="task-item-deadline">
			请选择所在地区
		</view>
	</view>
	<view class="task-item border">
		<view class="task-item-deadline">
			<text>事非宜，勿轻诺；苟轻诺，进退错。</text>
		</view>
	</view>
	<!-- 保存 -->
	<view class="form-control-button padding">
		<button class="form-button"
			@click="onSave">保 存</button>
	</view>
</view>
</template>

<script>
import { getMyInfo } from '@/api/index.js';
export default {
	data() {
		return {
			checked: false
		}
	},
	onShow() {
		const token = uni.getStorageSync('X-Auth-Token');
		if (!token) {
			uni.navigateTo({
				url: '/pages/login/login'
			});
		}
		getMyInfo().then(res => {
			console.log('res: ', res);
		})
	},
	methods: {
		onSave() {},
		onTaskItem(type) {
			switch(type) {
				case 'update':
					break;
				case 'cooperate':
					break;
				case 'report':
					break;
				case 'hotline':
					break;
				default:
					break;
			}
		}
	}
}
</script>
